import java.util.*;

public class mainTest {
	public static void main(String[] args) {
		
//		MyProposition mp = new MyProposition("(p⇒¬q)⇒r");
		MyProposition mp = new MyProposition("(p∧q)⇒r");
		System.out.println("1真值表：");
		mp.getTruthTable();
		System.out.println("主析取范式："+mp.getZXQFS());
		System.out.println("主合取范式："+mp.getZHQFS());


		MyProposition mp2 = new MyProposition("(p⇒r)∧(q⇒r)");
		System.out.println("2真值表：");
		mp2.getTruthTable();
		System.out.println("主析取范式："+mp2.getZXQFS());
		System.out.println("主合取范式："+mp2.getZHQFS());
		
		MyProposition mp3 = new MyProposition("(¬q∧(p⇒q))⇒¬p");
		System.out.println("3真值表：");
		mp3.getTruthTable();
		System.out.println("主析取范式："+mp3.getZXQFS());
		System.out.println("主合取范式："+mp3.getZHQFS());
		
		MyProposition mp4 = new MyProposition("(p∨q)∧(¬p∨r)⇒(q∨r)");
		System.out.println("4真值表：");
		mp4.getTruthTable();
		System.out.println("主析取范式："+mp4.getZXQFS());
		System.out.println("主合取范式："+mp4.getZHQFS());
	
		System.out.println("--------应用题--------------");
		MyProposition mp5 = new MyProposition("(¬p∧¬q)∨(¬p∧r)∨(p∧¬r)");
		System.out.println("5真值表：");
		mp5.getTruthTable();
		System.out.println("主析取范式："+mp5.getZXQFS());
		System.out.println("主合取范式："+mp5.getZHQFS());
		
		MyProposition mp6 = new MyProposition("(¬p∧¬q)∧(¬p∧r)");
		System.out.println("6真值表：");
		mp6.getTruthTable();
		System.out.println("主析取范式："+mp6.getZXQFS());
		System.out.println("主合取范式："+mp6.getZHQFS());
		
		MyProposition mp7 = new MyProposition("(¬p∧r)∧(p∧¬r)");
		System.out.println("7真值表：");
		mp7.getTruthTable();
		System.out.println("主析取范式："+mp7.getZXQFS());
		System.out.println("主合取范式："+mp7.getZHQFS());
		
		MyProposition mp8 = new MyProposition("(¬p∧¬q)∧(p∧¬r)");
		System.out.println("8真值表：");
		mp8.getTruthTable();
		System.out.println("主析取范式："+mp8.getZXQFS());
		System.out.println("主合取范式："+mp8.getZHQFS());
		
		MyProposition mp9 = new MyProposition("(¬p∧¬q)∧(¬p∧r)∧(p∧¬r)");
		System.out.println("9真值表：");
		mp9.getTruthTable();
		System.out.println("主析取范式："+mp9.getZXQFS());
		System.out.println("主合取范式："+mp9.getZHQFS());
	}	
}




/*
¬
∧
∨
⇒
⇔

public static int getDiadicOperationResult(char operator, int a, int b){
public String getBinary(int num, int resLength) {
public int getSingleTruthValue(String assignString) {
public MyProposition(String initExp) {
*/